namespace Library
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    [ToolboxBitmap(typeof(Date))]
    public class Date : Label
    {
        private IContainer components = null;
        private Timer mTimer;

        public Date()
        {
            this.InitializeComponent();
            this.mTimer = new Timer();
            this.mTimer.Interval = 0x3e8;
            this.mTimer.Tick += new EventHandler(this.mTimer_Tick);
            this.mTimer.Start();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.components = new Container();
        }

        private void mTimer_Tick(object sender, EventArgs e)
        {
            this.Text = DateTime.Now.ToString();
        }

        protected override void OnPaint(PaintEventArgs pe)
        {
            base.OnPaint(pe);
        }
    }
}

